
namespace java hydrap2p.proxy.manager
namespace py hydrap2p.proxy.manager
namespace csharp hydrap2p.proxy.manager

include "service.thrift"
include "servicemanager.thrift"

service ProxyManager extends servicemanager.ServiceManager {
	/**
		Stores the name of a local proxy version of a service
	*/
	void setProxyServiceLocation(1:string name, 2:service.ServiceLocation location) throws (1:servicemanager.NameTaken ouch),
	
	/**
		Gets the actual listening ServiceLocation for the proxy port, instead of any fake proxies
	*/
	service.ServiceLocation getRealServiceLocation(1:string name),
	
	/**
		Given the localtarget port listening on the proxy side, 
		open a remote port on the server where remotetarget is found
		and return the ServiceLocation that 
		should be given to any callback functions
	*/
	service.ServiceLocation openCallbackPort(1:service.ServiceLocation localtarget, 2:service.ServiceLocation remotetarget),
		
}